package com.joysuch.wwyt.workflow.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author jingwenkai
 * @Date 2021/08/02 15:40
 */
public enum WorkFlowExportComponentEnum {

    CHECKBOX("checkbox", "复选框");

    private String value;

    private String desc;

    WorkFlowExportComponentEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final String getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<String, WorkFlowExportComponentEnum> lookup = new HashMap<>();

    static {
        for (WorkFlowExportComponentEnum e : EnumSet.allOf(WorkFlowExportComponentEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static WorkFlowExportComponentEnum find(String value) {
        return lookup.get(value);
    }

}
